<template>
	<view>
		<view class="item" style="padding-top: 30upx ;">
			<view class="text-line">
				<text class="text-name">还款状态:</text>
				<text class="text-value">{{filterNull(intentData.statusStr)}}</text>
			</view>

			<view class="text-line">
				<text class="text-name">还款期数:</text>
				<text class="text-value">{{filterNull(intentData.stage)+"期"}}</text>
			</view>

			<view class="text-line">
				<text class="text-name">付款类型:</text>
				<text class="text-value">{{filterNull(intentData.collectionTypeName)}}</text>
			</view>

			<view class="text-line">
				<text class="text-name">应还日期:</text>
				<text class="text-value">{{filterNull(intentData.receivableDate)}}</text>
			</view>

			<view class="text-line">
				<text class="text-name">应还总金额:</text>
				<text class="text-value">￥{{filterNull(intentData.receivableAmount)}}</text>
			</view>

			<view class="text-line">
				<text class="text-name">已还总金额:</text>
				<text class="text-value">￥{{intentData.receivedAmount?intentData.receivedAmount:'0' }}</text>
			</view>

			<view class="text-line">
				<text class="text-name">欠款金额:</text>
				<text class="text-value">￥{{filterNull(intentData.uncollectedAmount)}}</text>
			</view>

			<view class="text-line">
				<text class="text-name">逾期天数:</text>
				<text class="text-value">{{filterNull(intentData.overdueDays)}}天</text>
			</view>

			<view class="" v-for="(item, index) in dataDetail" :key="index">

				<u-line color="#efefef" dashed margin="0 0 10px"></u-line>

				<view class="text-line">
					<text class="text-name">收款单号:</text>
					<text class="text-value">{{filterNull(item.collectionsNo)}}</text>
				</view>

				<view class="text-line">
					<text class="text-name">应收金额:</text>
					<text class="text-value">￥{{filterNull(item.receivableAmount)}}</text>
				</view>

				<view class="text-line">
					<text class="text-name">实收金额:</text>
					<text class="text-value">￥{{filterNull(item.receivedAmount)}}</text>
				</view>

				<view class="text-line">
					<text class="text-name">支付类型:</text>
					<text class="text-value">{{filterNull(item.paymentTypeName)}}</text>
				</view>

				<view class="text-line">
					<text class="text-name">支付时间:</text>
					<text class="text-value">{{filterNull(item.actualDate)}}</text>
				</view>

			</view>


		</view>


	</view>
</template>

<script>
	import {
		infocollection
	} from '../../../common/api.js'

	export default {
		data() {
			return {
				intentData: {},
				dataDetail: []
			}
		},
		methods: {
			getData() {
				infocollection(this.intentData.receivablesNo).then(res => {
					this.dataDetail = res
				})
			}
		},
		onLoad(op) {
			this.intentData = op;
			this.getData();
		}
	}
</script>

<style lang="scss" scoped>

</style>
